<template>
  <div class="home">
    <div class="item1">item1</div>
    <div class="item2">item2</div>
    <div class="item3">item3</div>
    <div class="item4">item4</div>
    <div class="item5">item5</div>
    <div class="item6">item6</div>
    <div class="item7">item7</div>
    <div class="item8">item8</div>
    <div class="item9">item9</div>
  </div>
</template>
<script setup>

</script>
<style lang="scss" scoped>
@function getColor($n) {
  $background: 'rgb(#{$n * 20}, #{$n * 20}, #{$n * 40})';
  @return unquote($background)
}
.home {
  // width: 1920px;
  // height: 1080px;
  background: rgb(137, 137, 137);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 5px;
  padding: 10px;
  box-sizing: border-box;
  @for $i from 1 through 9 {
    .item#{$i} {
      background: getColor($i);
    }
  }
}
</style>